home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 24 / MacFormat n. 24 (Spain) / MacFormat 24.bin / Demos / Jungle Activated! / JungleActivated Demo / jung DEMO d / 00087_Studio Scroll.ls < prev    next >
Encoding:
Text File  |  1996-10-14  |  3.4 KB  |  149 lines

  1. on enterFrame
  2.   global gBackgroundSound, gBackgroundVolume
  3.   set the volume of sound 2 to gBackgroundVolume
  4.   if soundBusy(2) = 0 then
  5.     sound playFile 2, getpn() & "Sounds:Bckgrd" & gBackgroundSound & ".aif"
  6.   end if
  7. end
  8.  
  9. on exitFrame
  10.   go(the frame)
  11. end
  12.  
  13. on idle
  14.   global gMemorySize
  15.   StudioSoundChange()
  16.   JukeBoxFragments()
  17.   RolloverCursor()
  18.   VideoBalloons()
  19.   ScrollRoutine()
  20.   if the mouseV < 50 then
  21.     set the visible of sprite 48 to 1
  22.   end if
  23.   if the mouseV > 50 then
  24.     set the visible of sprite 48 to 0
  25.   end if
  26.   preLoadStudioPics()
  27.   testOutCasts()
  28. end
  29.  
  30. on StudioSoundChange
  31.   if (rollOver(16) = 0) and (rollOver(17) = 0) then
  32.     if the windowList = [] then
  33.       nothing()
  34.     else
  35.       stopStdSound()
  36.     end if
  37.   end if
  38. end
  39.  
  40. on JukeBoxFragments
  41.   global gFragment1, gFragment2, gFragment3, gFragment4
  42.   set MBNumber to the number of cast "Fragment 1"
  43.   if rollOver(21) then
  44.     if gFragment1 = 0 then
  45.       set the castNum of sprite 21 to MBNumber
  46.     end if
  47.   end if
  48.   if rollOver(20) then
  49.     if gFragment2 = 0 then
  50.       set the castNum of sprite 20 to MBNumber + 1
  51.     end if
  52.   end if
  53. end
  54.  
  55. on RolloverCursor
  56.   repeat with i = 10 to 17
  57.     if rollOver(i) = 1 then
  58.       cursor([cast "Hotspot", cast "Hotspot Mask"])
  59.       exit
  60.       next repeat
  61.     end if
  62.     set HotspotCursor to 0
  63.   end repeat
  64.   repeat with i = 22 to 26
  65.     if rollOver(i) = 1 then
  66.       cursor([cast "Hotspot", cast "Hotspot Mask"])
  67.       exit
  68.       next repeat
  69.     end if
  70.     set HotspotCursor to 0
  71.   end repeat
  72.   if rollOver(8) then
  73.     cursor([cast "Volume Down"])
  74.   end if
  75.   if rollOver(9) then
  76.     cursor([cast "Volume Up"])
  77.   end if
  78.   if rollOver(8) = 0 then
  79.     if rollOver(9) = 0 then
  80.       if the mouseH < 621 then
  81.         if the mouseH > 20 then
  82.           if HotspotCursor = 0 then
  83.             cursor(-1)
  84.             set HotspotCursor to 1
  85.           end if
  86.         end if
  87.       end if
  88.     end if
  89.   end if
  90.   updateStage()
  91. end
  92.  
  93. on VideoBalloons
  94.   repeat with i = 2 to 7
  95.     if rollOver(i) then
  96.       set the visible of sprite (i + 28) to 1
  97.     end if
  98.     if (rollOver(i) = 0) or (mouseV() > 350) then
  99.       set the visible of sprite (i + 28) to 0
  100.     end if
  101.   end repeat
  102. end
  103.  
  104. on ScrollRoutine
  105.   if (the mouseH > 620) or (the mouseH < 21) then
  106.     repeat with i = 2 to 7
  107.       set the visible of sprite (i + 28) to 0
  108.     end repeat
  109.     if not (the windowList) = [] then
  110.       forget(window "stdsound.dir")
  111.     end if
  112.     repeat while the mouseH > 620
  113.       cursor([cast "Arrow Right", cast "Arrow Right Mask"])
  114.       rightTurnDelete()
  115.       puppetSprite(1, 1)
  116.       if the castNum of sprite 1 > 29 then
  117.         set the castNum of sprite 1 to 1
  118.       else
  119.         set the castNum of sprite 1 to the castNum of sprite 1 + 1
  120.       end if
  121.       updateStage()
  122.     end repeat
  123.     repeat while the mouseH < 21
  124.       cursor([cast "Arrow Left", cast "Arrow Left Mask"])
  125.       leftTurnDelete()
  126.       puppetSprite(1, 1)
  127.       if the castNum of sprite 1 < 2 then
  128.         set the castNum of sprite 1 to 30
  129.       else
  130.         set the castNum of sprite 1 to the castNum of sprite 1 - 1
  131.       end if
  132.       updateStage()
  133.     end repeat
  134.     set WhichStudio to string(the castNum of sprite 1)
  135.     if WhichStudio = "1" then
  136.       set WhichStudio to "Studio"
  137.     end if
  138.     if WhichStudio = "30" then
  139.       set WhichStudio to "Studio End"
  140.     end if
  141.     go(WhichStudio)
  142.     repeat with i = 2 to 7
  143.       set the visible of sprite (i + 28) to 0
  144.     end repeat
  145.     updateStage()
  146.     puppetSprite(1, 0)
  147.   end if
  148. end
  149.